<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>cr-simple-sel: Libcroco Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Libcroco Reference Manual">
<link rel="up" href="ch01.html" title="Extensive APIs description">
<link rel="prev" href="libcroco-cr-selector.html" title="cr-selector">
<link rel="next" href="libcroco-cr-statement.html" title="cr-statement">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libcroco-cr-simple-sel.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libcroco-cr-selector.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libcroco-cr-statement.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libcroco-cr-simple-sel"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libcroco-cr-simple-sel.top_of_page"></a>cr-simple-sel</span></h2>
<p>cr-simple-sel</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libcroco-cr-simple-sel.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="returnvalue">CRSimpleSel</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-simple-sel.html#cr-simple-sel-new" title="cr_simple_sel_new ()">cr_simple_sel_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="returnvalue">CRSimpleSel</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-simple-sel.html#cr-simple-sel-append-simple-sel" title="cr_simple_sel_append_simple_sel ()">cr_simple_sel_append_simple_sel</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="returnvalue">CRSimpleSel</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-simple-sel.html#cr-simple-sel-prepend-simple-sel" title="cr_simple_sel_prepend_simple_sel ()">cr_simple_sel_prepend_simple_sel</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-simple-sel.html#cr-simple-sel-to-string" title="cr_simple_sel_to_string ()">cr_simple_sel_to_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-simple-sel.html#cr-simple-sel-one-to-string" title="cr_simple_sel_one_to_string ()">cr_simple_sel_one_to_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-simple-sel.html#cr-simple-sel-dump" title="cr_simple_sel_dump ()">cr_simple_sel_dump</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-simple-sel.html#cr-simple-sel-dump-attr-sel-list" title="cr_simple_sel_dump_attr_sel_list ()">cr_simple_sel_dump_attr_sel_list</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-simple-sel.html#cr-simple-sel-compute-specificity" title="cr_simple_sel_compute_specificity ()">cr_simple_sel_compute_specificity</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libcroco-cr-simple-sel.html#cr-simple-sel-destroy" title="cr_simple_sel_destroy ()">cr_simple_sel_destroy</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libcroco-cr-simple-sel.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel">CRSimpleSel</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libcroco-cr-simple-sel.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="libcroco-cr-simple-sel.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="cr-simple-sel-new"></a><h3>cr_simple_sel_new ()</h3>
<pre class="programlisting"><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="returnvalue">CRSimpleSel</span></a> *
cr_simple_sel_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>The constructor of <a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a>.</p>
<p>Returns the new instance of <a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a>.</p>
</div>
<hr>
<div class="refsect2">
<a name="cr-simple-sel-append-simple-sel"></a><h3>cr_simple_sel_append_simple_sel ()</h3>
<pre class="programlisting"><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="returnvalue">CRSimpleSel</span></a> *
cr_simple_sel_append_simple_sel (<em class="parameter"><code><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a> *a_this</code></em>,
                                 <em class="parameter"><code><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a> *a_sel</code></em>);</pre>
<p>Appends a simpe selector to the current list of simple selector.</p>
<p><em class="parameter"><code>a_this</code></em>
: the this pointer of the current instance of <a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a>.
<em class="parameter"><code>a_sel</code></em>
: the simple selector to append.</p>
<div class="refsect3">
<a name="id-1.2.19.6.3.6"></a><h4>Returns</h4>
<p> the new list upon successfull completion, an error code otherwise.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cr-simple-sel-prepend-simple-sel"></a><h3>cr_simple_sel_prepend_simple_sel ()</h3>
<pre class="programlisting"><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="returnvalue">CRSimpleSel</span></a> *
cr_simple_sel_prepend_simple_sel (<em class="parameter"><code><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a> *a_this</code></em>,
                                  <em class="parameter"><code><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a> *a_sel</code></em>);</pre>
<p><em class="parameter"><code>a_this</code></em>
: the this pointer of the current instance of <a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a>.
<em class="parameter"><code>a_sel</code></em>
: the simple selector to prepend.</p>
<p>Prepends a simple selector to the current list of simple selectors.</p>
<p>Returns the new list upon successfull completion, an error code otherwise.</p>
</div>
<hr>
<div class="refsect2">
<a name="cr-simple-sel-to-string"></a><h3>cr_simple_sel_to_string ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *
cr_simple_sel_to_string (<em class="parameter"><code><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a> const *a_this</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-simple-sel-one-to-string"></a><h3>cr_simple_sel_one_to_string ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *
cr_simple_sel_one_to_string (<em class="parameter"><code><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a> const *a_this</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-simple-sel-dump"></a><h3>cr_simple_sel_dump ()</h3>
<pre class="programlisting">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
cr_simple_sel_dump (<em class="parameter"><code><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a> const *a_this</code></em>,
                    <em class="parameter"><code><span class="type">FILE</span> *a_fp</code></em>);</pre>
<p>Dumps the selector to a file.
TODO: add the support of unicode in the dump.</p>
<p>Returns CR_OK upon successfull completion, an error code
otherwise.</p>
<div class="refsect3">
<a name="id-1.2.19.6.7.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>a_this</p></td>
<td class="parameter_description"><p>the current instance of <a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>a_fp</p></td>
<td class="parameter_description"><p>the destination file pointer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cr-simple-sel-dump-attr-sel-list"></a><h3>cr_simple_sel_dump_attr_sel_list ()</h3>
<pre class="programlisting">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
cr_simple_sel_dump_attr_sel_list (<em class="parameter"><code><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a> const *a_this</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cr-simple-sel-compute-specificity"></a><h3>cr_simple_sel_compute_specificity ()</h3>
<pre class="programlisting">enum <a class="link" href="libcroco-cr-utils.html#CRStatus" title="enum CRStatus"><span class="returnvalue">CRStatus</span></a>
cr_simple_sel_compute_specificity (<em class="parameter"><code><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a> *a_this</code></em>);</pre>
<p><em class="parameter"><code>a_this</code></em>
: the current instance of <a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a></p>
<p>Computes the selector (combinator separated list of simple selectors)
as defined in the css2 spec in chapter 6.4.3</p>
<p>Returns CR_OK upon successfull completion, an error code otherwise.</p>
</div>
<hr>
<div class="refsect2">
<a name="cr-simple-sel-destroy"></a><h3>cr_simple_sel_destroy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
cr_simple_sel_destroy (<em class="parameter"><code><a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a> *a_this</code></em>);</pre>
<p><em class="parameter"><code>a_this</code></em>
: the this pointer of the current instance of <a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a>.</p>
<p>The destructor of the current instance of
<a class="link" href="libcroco-cr-simple-sel.html#CRSimpleSel" title="struct CRSimpleSel"><span class="type">CRSimpleSel</span></a>.</p>
</div>
</div>
<div class="refsect1">
<a name="libcroco-cr-simple-sel.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="CRSimpleSel"></a><h3>struct CRSimpleSel</h3>
<pre class="programlisting">struct CRSimpleSel {
        enum SimpleSelectorType type_mask ;
        gboolean is_case_sentive ;
        CRString * name ;
        /**
         *The combinator that separates
         *this simple selector from the previous
         *one.
         */
        enum Combinator combinator ;

        /**
         *The additional selector list of the
         *current simple selector.
         *An additional selector may
         *be a class selector, an id selector,
         *or an attribute selector.
         *Note that this field is a linked list.
         */
        CRAdditionalSel *add_sel ;

        /*
         *the specificity as specified by
         *chapter 6.4.3 of the spec.
         */
        gulong specificity ;

        CRSimpleSel *next ;
        CRSimpleSel *prev ;
        CRParsingLocation location ;
};
</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>